	
	var quizPrompt={
		programName:"",
		deviceType:-1,
		quizType:-1,
		unitName:"",
		isChallenge:0,
		isReviewQuiz: 0,
		testPaperId:-1,
		quizName:"",
		quizDesc:"",
		callback:undefined,
		quizPromptDialog:undefined,
		showQuizPromptDialog:function(){
			$("#quizDesc").html(quizPrompt.quizDesc);
			quizPrompt.quizPromptDialog = dialog({
				id: 'quiztipbox',
				title: quizPrompt.quizName,
				cancel: false,
				width: '500px',
				zIndex:'10241',
				content: $("#remind-box").html(),
				okValue: _System["ConfirmTest"],
				ok: function () {
					quizPrompt.startQuiz();
					return true;
				},
				cancelValue: _System["CancelTest"],
				cancel: function () {
					if(quizPrompt.callback!=undefined&&quizPrompt.callback!=null){
						quizPrompt.callback();
					}
					return true;
				}
			});
			quizPrompt.quizPromptDialog.showModal();
		},
		startQuiz:function(){
			if(quizPrompt.deviceType == 66||quizPrompt.deviceType == 67||quizPrompt.deviceType == 68||quizPrompt.deviceType == 69){//语音
				window.location.href = "/student/phonics/phonics-quiz.html?phonicsProgramName="+quizPrompt.programName+"&unitName="+quizPrompt.unitName+"&quizType="+quizPrompt.quizType+"&deviceType="+quizPrompt.deviceType;
			}else if(quizPrompt.deviceType == 13||quizPrompt.deviceType == 14||quizPrompt.deviceType == 82){//例句
				window.location.href = "/student/sentenceQuiz.html?programName="+quizPrompt.programName+"&unitName="+quizPrompt.unitName+"&testPaperId="+quizPrompt.testPaperId+"&quizType="+quizPrompt.quizType+"&deviceType="+quizPrompt.deviceType+"&isReviewQuiz="+quizPrompt.isReviewQuiz;
			}else if(quizPrompt.quizType == 82||quizPrompt.quizType == 83||quizPrompt.quizType == 84){//播放机小考
				window.location.href = "/student/player-quiz.html?testPaperId="+quizPrompt.testPaperId+"&quizType="+quizPrompt.quizType;
			}else if(quizPrompt.deviceType == 94||quizPrompt.deviceType == 95||quizPrompt.deviceType == 96){//红词场
				window.location.href = "/student/hcc/hcc-quiz.html?programName="+quizPrompt.programName+"&unitName="+quizPrompt.unitName+"&quizType="+quizPrompt.quizType+"&deviceType="+quizPrompt.deviceType;
			}else{
				if(quizPrompt.isChallenge==1){//极速挑战
					window.location.href = "/student/challenge.html?programName="+quizPrompt.programName+"&unitName="+quizPrompt.unitName+"&testPaperId="+quizPrompt.testPaperId+"&quizType="+quizPrompt.quizType+"&deviceType="+quizPrompt.deviceType+"&isReviewQuiz="+quizPrompt.isReviewQuiz;
				}else{
					window.location.href = "/student/quiz.html?programName="+quizPrompt.programName+"&unitName="+quizPrompt.unitName+"&testPaperId="+quizPrompt.testPaperId+"&quizType="+quizPrompt.quizType+"&deviceType="+quizPrompt.deviceType+"&isReviewQuiz="+quizPrompt.isReviewQuiz;
				}
			}
		}
	};
	/**
	 * 显示测试提示框
	 * @param programName
	 * @param deviceType
	 * @param quizType
	 * @param unitName
	 * @param isChallenge
	 * @param testPaperId
	 * @param _callback 回调函数
	 */
	function showQuizPrompt(programName,deviceType,quizType,unitName,isChallenge,testPaperId,_callback){
		if(programName==null||programName==undefined){
			programName="";
		}
		if(deviceType==undefined||deviceType<0){
			return;
		}
		if(quizType==undefined||quizType<0){
			return;
		}
		if(unitName==undefined||unitName.length<=0){
			unitName="";
		}
		if(isChallenge==undefined||isChallenge<0){
			isChallenge=0;
		}
		if(testPaperId==undefined||testPaperId<0){
			testPaperId=-1;
		}
		quizPrompt.programName = programName;
		quizPrompt.deviceType=deviceType;
		quizPrompt.quizType=quizType;
		quizPrompt.unitName=unitName;
		quizPrompt.isChallenge=isChallenge;
		quizPrompt.testPaperId=testPaperId;
		if(_callback!=undefined){
			quizPrompt.callback=_callback;
		}else{
			quizPrompt.callback=undefined;
		}
		$.ajax({
			url:'/student/quiz/getQuizTypeInfo',
		   	data:{"quizTypeId":quizPrompt.quizType},
		   	cache:false,
		   	dataType:"json",
			type:"post",
			success: function(data){
				if(data.success){
					quizPrompt.quizName=data.quizType.name;
					quizPrompt.quizDesc=data.quizType.desc;
					if($("#remind-box").length<=0){
						$.ajax({
						    url: '/student/common-quizPrompt.html',
						    success: function (data) {
						    	if($("#remind-box").length<=0){
						    		$("body").append(data);
						    	}
						    	quizPrompt.showQuizPromptDialog();
						    },
						    cache: false
						});
					}else{
						quizPrompt.showQuizPromptDialog();
					}
				}
			}
		});
	}
	/**
	 * 不显示测试弹窗，直接进入测试
	 * @param programName
	 * @param deviceType
	 * @param quizType
	 * @param unitName
	 * @param isChallenge
	 * @param testPaperId
	 */
	function toQuizNoPrompt(programName,deviceType,quizType,unitName,isChallenge,testPaperId){
		if(programName==null||programName==undefined){
			programName="";
		}
		if(deviceType==undefined||deviceType<0){
			return;
		}
		if(quizType==undefined||quizType<0){
			return;
		}
		if(unitName==undefined||unitName.length<=0){
			unitName="";
		}
		if(isChallenge==undefined||isChallenge<0){
			isChallenge=0;
		}
		if(testPaperId==undefined||testPaperId<0){
			testPaperId=-1;
		}
		quizPrompt.programName = programName;
		quizPrompt.deviceType=deviceType;
		quizPrompt.quizType=quizType;
		quizPrompt.unitName=unitName;
		quizPrompt.isChallenge=isChallenge;
		quizPrompt.testPaperId=testPaperId;
		quizPrompt.startQuiz();
	}